package com.ruoyi.core.mapper;

import java.util.List;

import com.ruoyi.core.domain.ClientProductUser;
import com.ruoyi.core.domain.custombean.ClientProductCookieQueryResult;
import org.apache.ibatis.annotations.Param;

/**
 * client-product-userMapper接口
 *
 * @author ruoyi
 * @date 2020-09-28
 */
public interface ClientProductUserMapper {
    /**
     * 查询client-product-user
     *
     * @param id client-product-userID
     * @return client-product-user
     */
    public ClientProductUser selectClientProductUserById(Long id);

    /**
     * 查询client-product-user列表
     *
     * @param clientProductUser client-product-user
     * @return client-product-user集合
     */
    public List<ClientProductUser> selectClientProductUserList(ClientProductUser clientProductUser);

    /**
     * 新增client-product-user
     *
     * @param clientProductUser client-product-user
     * @return 结果
     */
    public int insertClientProductUser(ClientProductUser clientProductUser);

    /**
     * 修改client-product-user
     *
     * @param clientProductUser client-product-user
     * @return 结果
     */
    public int update(ClientProductUser clientProductUser);

    /**
     * 删除client-product-user
     *
     * @param id client-product-userID
     * @return 结果
     */
    public int deleteClientProductUserById(Long id);

    /**
     * 批量删除client-product-user
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteClientProductUserByIds(Long[] ids);

    ClientProductUser findByUsername(String username);

    List<ClientProductUser> findByProductId(Long productId);

    ClientProductUser findByUserIdAndProductId(@Param("productUserId") Long productUserId, @Param("productId") Long productId);

    int deleteByProductIdSet(Long[] ids);

    List<ClientProductUser> findByIdSet(Long[] ids);

    List<ClientProductCookieQueryResult> findAllProductCookies(@Param("codeNull") Integer codeNull);

    void updateCookieAvailable(@Param("id") Long id, @Param("available") Integer available);
}
